<template>
	<view>
		<view class="title-more">
			<view class="app-title">
				<view class="left-shu"></view>
				<view class="wenzi">{{title}}</view>
			</view>
			<view class="more" v-if="showMore" @click="openUrl">
				{{moreText}} >>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "jxwTitle",
		props: {
			title: {
				type: String,
				default: "禁毒宣传"
			},
			moreText: {
				type: String,
				default: "更多"
			},
			showMore: {
				type: Boolean,
				default: false
			},
			url: {
				type: String,
				default: "/pages/shequ/index"
			},
			param: {
				type: Object,
				default: null
			}

		},
		data() {
			return {};
		},
		methods: {
			openUrl() {
				console.log("this.url", this.url)
				this.$public.navto(this.url, this.param)
			}
		}
	}
</script>

<style lang="scss">
	.app-title {
		height: 48rpx;
		display: flex;
		align-items: center;
		margin-bottom: 30rpx;

		.left-shu {
			width: 8rpx;
			height: 32rpx;
			background-color: #DF686A;
			margin-right: 16rpx;
		}

		.wenzi {
			color: #333333;
			font-size: 34rpx;
			font-weight: bold;
		}
	}

	.title-more {
		display: flex;
		justify-content: space-between;
		align-items: center;

		.more {
			font-size: 26rpx;
			color: #999999;
			// height: 48rpx;
			margin-bottom: 30rpx;
		}
	}
</style>